<admintpl file="header"/>
<body class="J_scroll_fixed">
<div class="wrap J_check_wrap">
  <ul class="nav nav-tabs">
     <li><a href="{:U('Statistics/index')}">用户列表</a></li>
     <li><a href="{:U('Statistics/source')}">来源统计</a></li>
     <li><a href="{:U('Statistics/month')}">月注册数</a></li>
     <li><a href="{:U('Statistics/day')}">日注册数</a></li>
     <li class="active"><a>猜错记录</a></li>
  </ul>
		<form class="well form-search">
			<div class="search_type cc mb10">
				<div class="mb10">
					<span class="mr20">
						<if condition="$num neq 0">
							共有 {$num} 条相关记录
						</if>
					</span>
				</div>
			</div>
		</form>
		      <div class="p10"><div class="pages"> {$Page} </div> </div>
    <div class="table_list">
      <table width="100%" class="table table-hover">
        <thead>
          <tr>
            <th width="60">ID</th>
            <th width="200">ID：用户昵称</th>
            <th>竞猜ID</th>
            <th>下注类别</th>
            <th>投注金额</th>
            <th>投注倍数</th>
            <th width="120">下注时间</th>
          </tr>
        </thead>
        <foreach name="userbets" item="vo">
        	<tr>
				<td>{$vo.id}</td>
				<td>{$vo.userid}：
        		<foreach name="users" item="user">
						<if condition="$user['id'] eq $vo['userid']">
	        		{$user.nickname}
	        	</if>
            </foreach>
				</td>
				<td>
					<php>
						for($b=0;$b<count($bets);$b++){
							if($bets[$b]['id'] == $vo['betid']){
								for($m=0;$m<count($matchinfos);$m++){
									if($bets[$b]['matchinfoid'] == $matchinfos[$m]['matchconstid']){
										for($t=0;$t<count($teams);$t++){
											if($teams[$t]['constid'] == $matchinfos[$m]['teamid1'] || $teams[$t]['teamnumber'] == $matchinfos[$m]['teamid1']){
												echo $teams[$t]['teamname'].' : ';
											}
										}
										for($t=0;$t<count($teams);$t++){
											if($teams[$t]['constid'] == $matchinfos[$m]['teamid2'] || $teams[$t]['teamnumber'] == $matchinfos[$m]['teamid2']){
												echo $teams[$t]['teamname'];
											}
										}
									}
								}
							}
						}
					</php>
				</td>
				<td>
					<if condition="$vo['betoption'] eq 'w'">
						主队获胜
					</if>
					<if condition="$vo['betoption'] eq 'd'">
						两队战平
					</if>
					<if condition="$vo['betoption'] eq 'l'">
						客队获胜
					</if>
				</td>
				<td>{$vo.points}</td>
				<td>{$vo.odds}</td>
				<td>{$vo.created}</td>
			</tr>
        </foreach>
        <thead>
          <tr>
            <th width="60">ID</th>
            <th width="200">ID：用户昵称</th>
            <th>竞猜ID</th>
            <th>下注类别</th>
            <th>投注金额</th>
            <th>投注倍数</th>
            <th width="120">下注时间</th>
          </tr>
        </thead>
      </table>
      <div class="p10"><div class="pages"> {$Page} </div> </div>
      <div class="form-actions">
        <button type="button" class="btn" onclick="javascript:history.go(-1);">返回</button>
      </div>
    </div>
</div>
<script type="text/javascript" src="__ROOT__/statics/js/common.js"></script>
</body>
</html>